﻿using RaptorEngine;
using RaptorEngine.Components.Drawable;
using RaptorEngine.Managers;

namespace OilRigSumoWrestlers.Entities.MenuItems
{
    class ContinueGameItem : MenuItem
    {
        public ContinueGameItem(DrawableText selectedText, DrawableText deselectedText)
            : base(selectedText, deselectedText) { }

        public override void Execute()
        {
            GameEngine.Instance.Scene.RemoveCurrentScene();
            GameEngine.Instance.Scene.StartCurrentScene();
            GameEngine.Instance.Scene.ShowCurrentScene();
            GameEngine.Instance.Audio.ResumeMusic();
            if(GameEngine.Instance.Network.State != NetworkManager.NetworkState.Offline)
                GameEngine.Instance.Network.State = NetworkManager.NetworkState.Ending;
        }
    }
}
